/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ru.jSkyRoom.bridge.sub;

import ru.jSkyRoom.bridge.JSkyBridge;
import ru.jSkyRoom.interfaces.major.Texture;
import ru.jSkyRoom.interfaces.sub.AltTexture;
import skyproc.AltTextures;
import skyproc.FormID;

/**
 *
 * @author Rakev
 */
public class AltTextureBridge extends JSkyBridge<AltTextures.AltTexture> implements AltTexture {

    public AltTextureBridge(AltTextures.AltTexture rawObject) {
        super(rawObject);
    }

    @Override
    public String getName() {
        return getRawObject().getName();
    }

    @Override
    public void setName(String name) {
        getRawObject().setName(name);
    }

    @Override
    public Texture getTexture() {
        FormID id = getRawObject().getTexture();
        return getFinderFactory().createTextureFinder().find(id);
    }

    @Override
    public void setTexture(Texture txst) {
        FormID id = getIdProducer().produce(txst);
        getRawObject().setTexture(id);
    }

    @Override
    public int getIndex() {
        return getRawObject().getIndex();
    }

    @Override
    public void setIndex(int index) {
        getRawObject().setIndex(index);
    }
}
